package com.piesat.quake.business.device.mqtt.pipeline.datahandler;

import java.util.List;

import io.netty.buffer.ByteBuf;

/**
 * 数据处理器
 *
 * @author Gersy
 * @date 2023/3/2
 * @since 1.0
 */
public interface DataHandler {

    String getNodeFieldName();

    void setNodeFieldName(String fieldName);

    Object decode(ByteBuf byteBuf, Object data);

    void encode(ByteBuf byteBuf, Object data);

    void addChild(DataHandler handler);

    List<DataHandler> getChildren();

    int getLength();
}
